package com.tanhua.server.job;

import com.tanhua.dubbo.api.mongo.VoiceApi;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * wzp 2021/6/23 16:01
 */
@Component
@Slf4j
public class ChangeJob {

    @Reference
    private VoiceApi voiceApi;

    /**
     * 0 0 0 * * ?
     * 意思是每日凌晨0时0分0秒时执行一次
     */
    @Scheduled(cron = "0 0 0 * * ?")
    public void recoverTime(){
        log.info("接收语音次数统一修改...");
        voiceApi.recover();
    }
}
